package by.grsu.hdm.model;

import java.util.ArrayList;
import java.util.List;

public class MediaPlayer 
{
private List<String> Formats = new ArrayList<String>();
private List<Media> MediaFiles = new ArrayList<Media>();
public MediaPlayer()
{
	Formats.add(".mp4"); Formats.add(".mp3"); Formats.add(".wav"); Formats.add(".flv");
}
public void addFormat(String format)
{
	Formats.add(format);
}
public void addMediaFile(Media media)
{
	MediaFiles.add(media);
}
public void stop()
{
	System.out.println("Mediaplayer is stopped");
}
public void pause()
{
	System.out.println("Mediaplayer is paused");
}
public void play(Media media)
{
	System.out.println("Mediaplayer is playing "+media.getName()+media.getType()+" now");
}
public String play(int id) {
	return "MediaPlayer is playing |"+MediaFiles.get(id).getName()+"| now";
}
public int getCountFiles() {
	return MediaFiles.size();
}
public String getName(int i) {
	return MediaFiles.get(i).getName();
}
}


